package com;

public class TestLike {

	public static void main(String[] args) {
		String s = "ABCDEFGHJKLMNOPQ";
		s = "2024-11-21 00:12:21";
//		System.out.println(s.substring(3,4));
//		System.out.println(s.substring(4));
		System.out.println(s.substring(0, 10));
		
		// 第4碼 + 第2碼 + 第3碼
		String cartonId = "DCHL022N";
		System.out.println((cartonId.startsWith("D") ? "A" : "F") + cartonId.substring(3,4) + cartonId.substring(1,3));
		cartonId = "V50G172G";
		System.out.println((cartonId.startsWith("D") ? "A" : "F") + cartonId.substring(3,4) + cartonId.substring(1,3));
	}
}
